package ils.domain.issue.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
@Entity
@Table(name="reserves")
public class Reserve
{
    private Integer id;
    private Integer userId;
    private Integer bookId;
    private Date reserveDate;
    private Date expiryDate;
    private boolean status;
    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name = "increment", strategy = "increment")
    public Integer getId()
    {
        return id;
    }
    public void setId(Integer id)
    {
        this.id = id;
    }
    public Integer getUserId()
    {
        return userId;
    }
    public void setUserId(Integer userId)
    {
        this.userId = userId;
    }
    public Integer getBookId()
    {
        return bookId;
    }
    public void setBookId(Integer bookId)
    {
        this.bookId = bookId;
    }
    public Date getReserveDate()
    {
        return reserveDate;
    }
    public void setReserveDate(Date reserveDate)
    {
        this.reserveDate = reserveDate;
    }


    public Date getExpiryDate()
    {
        return expiryDate;
    }
    public void setExpiryDate(Date expiryDate)
    {
        this.expiryDate = expiryDate;
    }
    @Type(type="yes_no")
    public boolean isStatus()
    {
        return status;
    }
    public void setStatus(boolean status)
    {
        this.status = status;
    }
}
